<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
       
    </style>
</head>
<body>
    <div id="app">
        <!-- <input type="text" v-model.lazy="txt"> -->
        <!-- <input type="text" v-model.trim="txt"> -->
        <input type="text" v-model.number="txt">
        {{txt}}
        <button @click="fn">打印</button>
    </div>
    <script src="./vue.js"></script>
    <script>
        let vm = new Vue({
            el:"#app",
            data:{
                txt:""
            },
            methods:{
                fn(){
                    console.log(this.txt)
                }
            }
            
        })
    </script>
</body>
</html>